package cn.mengfly.fxtest.event;

import javafx.event.Event;
import javafx.event.EventType;

/**
 * fireEvent:
 * <p>
 * UserEvent event = new UserEvent(UserEvent.LOGIN_SUCCEEDED);
 * <p>
 * Node node;
 * <p>
 * node.fireEvent(event)
 *
 * @author Mengfly
 * @date 2021/5/26 18:34
 */
public class UserEvent extends Event {

    public static final EventType<UserEvent> ANY = new EventType<>(Event.ANY, "ANY");
    public static final EventType<UserEvent> LOGIN_SUCCEEDED = new EventType<>(ANY, "LOGIN_SUCCEEDED");
    public static final EventType<UserEvent> LOGIN_FAILED = new EventType<>(ANY, "LOGIN_FAILED");


    public UserEvent(EventType<? extends Event> eventType) {
        super(eventType);
    }

    // any other fields of importance, e.g. data, timestamp
}
